﻿@model List<ZhongheCms.Models.GswViewTieba>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    
}
@section css{
    <link rel="stylesheet" href="/Assets/css/datepicker.css" />
}
<div class="row">
    <div class="col-xs-12 padding-0">
        <div class="widget-box">
            <div class=" widget-header widget-header-flat" style="padding-left: 0px">
              
                <div class="widget-toolbar">
                    <form name="thisform" method="post" class="form-search" action="/Tieba/Index/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid">
                        <label>
                            <input class="date-picker search-input" id="sdate" name="sdate" type="text" data-date-format="yyyy-mm-dd" value="@ViewBag.sdate" placeholder="开始日期" style="width: 120px"/>
																	<i class="fa fa-exchange"></i>
																<input class="date-picker search-input" id="edate" name="edate" type="text" data-date-format="yyyy-mm-dd" value="@ViewBag.edate" placeholder="结束日期" style="width: 120px"/>
                            <input type="text" name="keywords" id="keywords" placeholder="关键词" value="@ViewBag.keywords" class="search-input"  autocomplete="off">
                        </label>
                        
															
                        <label>
                            <button type="submit" class="btn btn-xs btn-toolbar pull-right">
                                &nbsp;&nbsp; <i class="fa fa-search"></i><span class="bigger-110">搜索</span> &nbsp;&nbsp;
                            </button>
                        </label>
                    </form>
                </div>

            </div>
            <div class="widget-body">
                <div class="widget-main padding-2">

                    <table class="table table-striped table-bordered table-hover">
                        <tr>
                            <th class="center">管理
                            </th>
                           <th>发布日期
                            </th>
                            <th>发布人</th>
                            <th>主题</th>
                            <th>阅读量</th>
                            <th>回复数</th>
                            <th>点赞数</th>
                            <th class="center">删除
                            </th>
                        </tr>
                        <tbody>
                            @foreach (var item in Model)
                            {
                                
                                <tr>
                                    <td class="center">
                                  
                                        <a href="/Tieba/TiebaView/@item.Id?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&keywords=@ViewBag.keywords"><span class="btn btn-xs btn-info no-border">
                                                                                                                                                                                                      <i class="fa fa-pencil-square-o"></i></span></a>
                                    
                                        
                                    </td>
                                  


                                    <td>
                                        @item.PubDate.ToShortDateString() <span>&nbsp;</span>@item.PubTime
                                    </td>
                                    <td>
                                        @item.MemberNickname
                                      
                                    </td>
                                    <td>
                                        @item.Title
                                    </td>
                                     <td>
                                        @item.VisitNum
                                    </td>
                                    <td>
                                        @item.ReplyNum
                                    </td>
                                    <td>
                                        @item.LikeItNum
                                    </td>
                                  
                                   
                                    <td class="center">
                                  
                                        <a  class="confirm" href="/Tieba/Delete/@item.Id?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&keywords=@ViewBag.keywords"><span
                                                                                                                                                                                                                       class="btn btn-xs btn-danger no-border"><i class="fa fa-trash-o"></i></span></a>
                                   
                                       
                                    </td>
                                </tr>
                                       
                            }
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>
@section js
{
     
    <script src="/assets/js/date-time/bootstrap-datepicker.min.js"></script>
    <script src="/assets/js/date-time/bootstrap-datepicker.zh-CN.js" ></script>
    <script src="/assets/js/bootbox.min.js"></script>
    <script type="text/javascript">
        jQuery(function ($) {
            //$('.datepick').datepicker({ autoclose: true, format: "yyyy-mm-dd", language: "zh-CN" });
            $('.date-picker').datepicker({
                autoclose: true,
                todayHighlight: true,
                language: "zh-CN"
            });
            bootbox.setDefaults({ locale: "zh_CN" });
            $(".confirm").on(ace.click_event, function (e) {
                e.preventDefault();
                var link = $(this).attr("href");
                bootbox.confirm("确认删除此记录吗?", function (result) {
                    if (result) {
                        document.location.href = link;
                    }
                });
            });

        });
    </script>

}
